<?php
$loader->requireOnce('includes/CorePayment/BillMaker.abstract.php');
$loader->requireOnce('InBedImporter.class.php');
$loader->requireOnce('InMaterialImporter.class.php');
$loader->requireOnce('InMedicineImporter.class.php');
$loader->requireOnce('InParacliniqueImporter.class.php');
$loader->requireOnce('InServiceImporter.class.php');
$loader->requireOnce('includes/PaymentException.class.php');
class InPatientBillMaker extends BillMaker {
    public function create($type) {
        switch ($type) {
            case PaymentConstant::ITEM_BED:
                return new InBedImporter($this->storage);
                break;
            case PaymentConstant::ITEM_MATERIAL:
                return new InMaterialImporter($this->storage);
            case PaymentConstant::ITEM_MEDICINE:
                return new InMedicineImporter($this->storage);
            case PaymentConstant::ITEM_PARACLINIQUE:
                return new InParacliniqueImporter($this->storage);
            case PaymentConstant::ITEM_SERVICE:
                return new InServiceImporter($this->storage);
            default:
                throw new PaymentException("Billable item type '$type' is not supported",
                   PaymentErrorCode::BILLABLE_ITEM_TYPE_NOT_SUPPORTED);
        }
    }
}
?>